package com.luozongyao.statistics.controller;


import com.luozongyao.commons.R;
import com.luozongyao.statistics.service.ReportUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author luozongyao
 * @since 2021-11-10
 */
@Api(description="统计举报用户信息管理")
@RestController
@RequestMapping("/statistics/report-user")
@CrossOrigin
public class ReportUserController {

    @Autowired
    private ReportUserService reportUserService;

    //获取某天用户被举报数
    @ApiOperation(value = "获取某天用户被举报数")
    @GetMapping("reportUserCount/{day}")
    public R getReportUserCount(@PathVariable String day){
        Integer reportUserCount= reportUserService.getReportUserCount(day);
        return R.ok().data("reportUserCount",reportUserCount);
    }

}

